home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / MODULA_2 / 2394.ZIP / M2TOOLS1.ZIP / ENCRYPT.DEF < prev    next >
Text File  |  1990-08-13  |  1KB  |  37 lines

  1. DEFINITION MODULE Encrypt;
  2.  
  3.   FROM Streams IMPORT FileName;
  4.  
  5.   PROCEDURE GetKey (Display : BOOLEAN);
  6.  
  7.      (* This procedure will accept the user input for the password key.
  8.         If Display is TRUE then the key will be displayed at the current
  9.         position on the screen.
  10.         The maximum key length is 40 characters.
  11.  
  12.         PLEASE NOTE : The Key IS CASE SENSITIVE.  If you get the key wrong
  13.         then you must backtrack with the same key and try the first one
  14.         again.
  15.  
  16.         You can encrypt a file any number of times with different keys, but
  17.         to uncrypt it you must use the same keys in reverse order.
  18.  
  19.         e.g.  To Encrypt
  20.                 Keys:
  21.                     i) Hello
  22.                    ii) there
  23.                   iii) World
  24.               To Unencrypt
  25.                 Keys:
  26.                     i) World
  27.                    ii) there
  28.                   iii) Hello *)
  29.  
  30.  
  31.   PROCEDURE EncryptFile (VAR File : FileName);
  32.  
  33.      (* This procedure both encrypts and de-encrypts a file.  The same key 
  34.         that is used to encrypt a file MUST be used to be able to unencrypt
  35.         the file.  The key is a string of upto 40 characters. *)
  36.  
  37. END Encrypt.